<if condition="$nanyou_hide_header">
<else />

<!DOCTYPE html>
<html lang="en">
<head><title>{$page_title} - {:C('bianliang._sys_name')}</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="Thu, 19 Nov 1900 08:52:00 GMT">
    <link rel="shortcut icon" href="__PUBLIC__/ico/favicon.ico">
    <link rel="apple-touch-icon" href="__PUBLIC__/ico/favicon.png">
    <link rel="apple-touch-icon" sizes="72x72" href="__PUBLIC__/ico/favicon-72x72.png">
    <link rel="apple-touch-icon" sizes="114x114" href="__PUBLIC__/ico/favicon-114x114.png">

    <!--LOADING BOOTSTRAP CSS-->
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/bootstrap3.20/css/bootstrap.min.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/bootstrap-table/src/bootstrap-table.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/bootstrap3-editable/css/bootstrap-editable.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/bootstrap-select/bootstrap-select.min.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.1.1.min.css">

    <!--LOADING MAIN CSS-->
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/css/themes/style1/nanyou.css" class="default-style">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/font-awesome/css/font-awesome.min.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/jquery-ui-1.10.4.custom/css/ui-lightness/jquery-ui-1.10.4.custom.min.css"/>
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/animate.css/animate.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/jquery-pace/pace.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/iCheck/skins/all.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/jquery-nestable/nestable.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/bootstrap-daterangepicker/daterangepicker-bs3.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/jqgrid/ui.jqgrid.css?0820">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/sweetalert/sweetalert.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/mCustomScrollbar/jquery.mCustomScrollbar.min.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/select2/select2-madmin.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/multi-select/css/multi-select-madmin.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/clockpicker/clockpicker.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/jquery-tablesorter/themes/blue/style-custom.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/css/nocpanel.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors/calendar/zabuto_calendar.min.css">
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/vendors_no/tagcloud/css/tagcloud.css">

    <!--LOADING STYLE-->
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/css/themes/style1/orange-blue.css" class="default-style"> 
    <if condition="$my_theme">
        <link type="text/css" rel="stylesheet" href="__PUBLIC__/css/themes/style1/{$my_theme}.css" id="theme-change" class="style-change color-change">
    </if>
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/css/style-responsive.css">

    <!--LOADING JQUERY JS-->
    <script src="__PUBLIC__/js/jquery-1.10.2.min.js"></script>
    <script src="__PUBLIC__/js/jquery-migrate-1.2.1.min.js"></script><!-- jquery升级过度插件，应用迁移辅助插件 -->
    <script src="__PUBLIC__/js/jquery-ui.min.js"></script><!-- jquery Ui提供网页用户界面代码库，可视控件 -->
    <script src="__PUBLIC__/vendors/metisMenu/jquery.metisMenu.js"></script><!-- jQuery可折叠菜单插件 -->
    <script src="__PUBLIC__/vendors/slimScroll/jquery.slimscroll.min.js"></script><!-- jQuery滚动条插件 -->
    <script src="__PUBLIC__/vendors/jquery-cookie/jquery.cookie.js"></script><!-- jQuery cookie插件 -->
    <script src="__PUBLIC__/vendors/jquery-pace/pace.min.js"></script><!-- jQuery加载进度动画插件 -->
    <script src="__PUBLIC__/vendors/responsive-tabs/responsive-tabs.js"></script><!-- jQuery响应式tab标签插件 -->
    <script src="__PUBLIC__/vendors/iCheck/icheck.min.js"></script><!-- jQuery单选框复选框美化插件 -->
    <script src="__PUBLIC__/vendors/iCheck/custom.min.js"></script><!-- jquery Ui依赖插件 -->
    <script src="__PUBLIC__/vendors/jquery-validate/jquery.validate.min.js"></script><!-- jQuery验证框架 -->
    <script src="__PUBLIC__/vendors/select2/select2.min.js"></script><!-- jQuery select美化模拟类插件 -->
    <script src="__PUBLIC__/vendors/multi-select/js/jquery.multi-select.js"></script><!-- jQuery开发的美化Select多选插件 -->
    <script src="__PUBLIC__/vendors/mCustomScrollbar/jquery.mousewheel.min.js"></script><!-- jquery自定义滚动条特效插件 -->
    <script src="__PUBLIC__/vendors/mCustomScrollbar/jquery.mCustomScrollbar.min.js"></script><!-- jquery定义滚动条样式插件 -->
    <script src="__PUBLIC__/vendors/jquery-tablesorter/jquery.tablesorter.min.js"></script><!-- jQuery表格排序组件 -->
    <script src="__PUBLIC__/vendors/DataTables/media/js/jquery.dataTables.min.js"></script><!-- jQuery的表格插件 -->

    <!--LOADING BOOTSTRAP JS-->
    <script src="__PUBLIC__/vendors/bootstrap/js/bootstrap.min.js"></script>
    <script src="__PUBLIC__/vendors/bootstrap-hover-dropdown/bootstrap-hover-dropdown.js"></script><!-- bootstrap下拉控件 -->
    <script src="__PUBLIC__/vendors/bootstrap-daterangepicker/daterangepicker.js"></script><!-- bootstrap双日历控件 -->
    <script src="__PUBLIC__/vendors/bootstrap-select/bootstrap-select.min.js"></script><!-- bootstrap下拉框美化插件 -->
    <script src="__PUBLIC__/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script><!-- bootstrap进度条美化插件 -->
    <script src="__PUBLIC__/vendors/DataTables/media/js/dataTables.bootstrap.js"></script><!-- bootstrap表格美化插件 -->
    
    <!--LOADING MAIN SCRIPTS-->
    <script src="__PUBLIC__/js/jquery.menu.js"></script><!-- 系统左侧导航菜单折叠与展开的js文件 -->
    <script src="__PUBLIC__/js/moment.min.js"></script><!-- 日期处理类库 -->
    <script src="__PUBLIC__/vendors/layer/layer.min.js"></script><!-- 弹层控件 -->
    <script src="__PUBLIC__/js/form-validation.js"></script><!-- 表单验证插件 -->
    <script src="__PUBLIC__/vendors/sweetalert/sweetalert.min.js"></script><!-- 炫酷的弹出提示框控件 -->
    <script src="__PUBLIC__/vendors/My97DatePicker/WdatePicker.js"></script><!-- 日期控件 -->
    <script src="__PUBLIC__/vendors/clockpicker/clockpicker.js"></script><!-- 时钟控件 -->
    <script src="__PUBLIC__/vendors/jqgrid/jquery.jqGrid.min.js"></script><!-- jqGrid表格控件 -->
    <script src="__PUBLIC__/vendors/jqgrid/i18n/grid.locale-cn.js"></script><!-- jqGrid汉化 -->
    <script src="__PUBLIC__/js/wavesurfer.js"></script><!-- 创建交互式可操作音频可视化控件 -->

    <!--CORE JAVASCRIPT-->
    <script src="__PUBLIC__/js/nocpanel.js"></script><!-- 站内消息js文件 -->
    <script src="__PUBLIC__/js/ny.sysCheck.js"></script><!-- 系统检查类js文件 -->
    <script src="__PUBLIC__/js/main.js"></script>

<script type="text/javascript">

    //使用notice对象封装消息
    var notice = {
        time: 0,
        title: document.title,
        timer: null,
        // 显示新消息提示执行方法
        show: function () {
            var title = notice.title;
            // 定时器，设置消息切换频率闪烁效果就此产生
            notice.timer = setTimeout(function () {
                notice.time++;
                notice.show();
                if (notice.time % 2 == 0) {
                    document.title = "您有1个电话呼入···";
                } else {
                    document.title = title;
                };
            }, 1000);
            return [notice.timer, notice.title];
        },
        // 取消新消息提示方法
        clear: function () {
            clearTimeout(notice.timer);
            document.title = notice.title;
        }
    };


    //需要取消闪烁时调用此方法，单击取消闪烁提示
    function bind() {
        document.onclick = function () {
            notice.clear();
        };
    }


  var mtoggle = "{$my_mtoggle}";
	var _root_path="__ROOT__";
	var _public_path="__PUBLIC__";
    var _my_exten = "{$Think.session.exten}";
    function edit_myself(){
        $.get('{:U('user/edit')}&who=1'+'&id={$Think.session.role_id}&t=' + Math.random(1000), '', function(data){  
            parent.layer.open({
                type: 1,
                //skin: 'layui-layer-rim', //加上边框
                area: ['600px', '560px'], //宽高
                title: '编辑',
                shadeClose:true, //点击遮罩层 关闭
                content: data
            });
        }) 

    }
//wangchao  2016-5-13

$(function(){
    
    //如果当前打开的页面是通话流水，就调用此方法
    if($("#page_title").html() == "通话流水 "){
        notice.show();
    }

    $('#phonebox').keydown(function(event){ 
        if(event.keyCode==13){ 
            $("#callout").click(); 
        }
    });
    $('#phonebox').focus(function(){
        $('.page-topsec-inputbox').css('border','1px solid #468847');
        $('#callout').css('color','#468847');
        //绑定键盘回车事件
         
    });
    $('#phonebox').blur(function(){
        $('.page-topsec-inputbox').css('border','1px solid #d8e3ef');
        $('#callout').css('color','grey');
        $(document).keydown(function(event){ 
            if(event.keyCode==13){ 
                return false; 
            }
        }); 
    });
    $('#callout').click(function(){
        dial($('#phonebox').val(),'','');      
    });


     $('#btn-dnd').on('switch-change', function (e, data) {
        if(data.value){
            setDND(1);
        }else{
            setDND(0); 
        }
    });

     $("#menu_{$page_action_code}").addClass("active")
     $(".nav-second-level .active").parent().closest("li").attr("class","active");
     $(".nav-second-level .active").parent().attr('aria-expanded','true');
	 
	 $("#btn-queue-server-unpause").bind('click',function(){
		 $.get('{:U("monitor/unpause")}'+'&t='+Math.random(1000),'',function(data){
			 alert(data);
		 }); 
	 });
	 $("#btn-queue-server-pause").bind('click',function(){
		  $.get('{:U("monitor/pause")}'+'&t='+Math.random(1000),'',function(data){
			 alert(data);
		 }); 
	 });
	 
	 



    var cur_val = 1;
    if ($.cookie("intro_cookie_index") == cur_val){
        return;
    }
    introJs().setOptions({
        nextLabel: '下一步 &rarr;',
        prevLabel: '&larr; 上一步',
        skipLabel: '跳过',
        doneLabel: "完成",
        exitOnOverlayClick:true,
        exitOnEsc: true,
        showBullets:true
    }).oncomplete(function(){
        $.cookie("intro_cookie_index",cur_val,{expires:30});
    }).onexit(function(){
        $.cookie("intro_cookie_index",cur_val,{expires:30});
    }) .start();


})
//发送消息模块
function fasong()
{   
     CloseNoc();
     $.get('{:U("message/add")}'+'&t=' + Math.random(1000), '', function(data){  
       parent.layer.open({
         type: 1,
         area: ['420px', '400px'],
         title: '发送消息',
         shadeClose:true,
         content: data
       });
     }) 
}


</script>
<style type="text/css">
body {
  font-family: Arial,"Hiragino Sans GB","微软雅黑","黑体-简", Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.42857143;
  color: #777777;
  background-color: #f0f2f5;
}
</style>
</head>
<body <if condition="$my_mtoggle eq 'shrank' ">class="sidebar-collapsed"</if>>
<div>

    <!--BEGIN BACK TO TOP--><a id="totop" href="javascript:void(0);"><i class="fa fa-angle-up"></i></a><!--END BACK TO TOP-->
    <!--BEGIN TOPBAR-->
    <div id="header-topbar-option-demo" class="page-header-topbar">
        <nav id="topbar" role="navigation" style="margin-bottom: 0; z-index: 2;" class="navbar navbar-default navbar-static-top">
            <div class="navbar-header" data-step="7" data-intro="这仅仅是冰山一角而已,还有好多更炫酷更强大的功能在其中，快来体验吧！" data-position="right">
                <button type="button" data-toggle="collapse" data-target=".sidebar-collapse" class="navbar-toggle"><span class="sr-only">触发导航</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button>
                <a id="logo" href="__APP__?m=index"  target='_blank' class="navbar-brand"><span class="fa fa-rocket"></span><span class="logo-text">{:C('bianliang._sys_name')}</span><span style="display: none" class="logo-text-icon">S</span></a>
            </div>
            <div class="topbar-main" style="background: #FFF">
            <a id="menu-toggle" href="javascript:void(0);" class="hidden-xs"><i class="fa fa-bars text-primary"></i></a>
  			<span class="col-sm-2 navbar-brand" id="page_title">{$page_title} </span>
                      <if condition="$Think.session.exten gt 0">
                        <div class="page-topsec-area">
                            <div class="page-topsec-inputbox">
                                <input id="phonebox" type="text" placeholder="点击拨号">
                                <a id="callout" href="javascript:;" class="fa fa-phone" ></a>
                            </div>
                        </div>
                       </if>

                <ul class="nav navbar navbar-top-links navbar-right mbn">

                    <if condition="$Think.session.exten gt 0">
                    <li class="dropdown"  ><a data-hover="dropdown" href="javascript:void(0);" class="dropdown-toggle" id="a_user_status" ><i class="fa fa-circle fa-fw user_status_0" id="user_status_fa" title=""></i>  <span id="user_status_text" style="color: #777777" ></span></a>
                        <ul class="dropdown-menu dropdown-alerts">
                            <li style="background: #33485c; color: #FFF;padding: 10px 15px; margin-bottom: 0;"><div style="float: left; padding-top:3px;">最近10通电话</div>
<!--                                 <div id="btn-dnd" style=" float: right;" >
                                     <div data-off="success" data-on="danger" class="make-switch switch-left switch-small"  data-off-label   ="就绪" data-on-label="免打扰" data  -placement="top"  class="btn btn-default mbs" ><input type="checkbox" checked="checked" class="switch " />
                                     </div>
                               </div> -->
                            </li>
                            <li>
                                <div class="dropdown-slimscroll11" id="div_phone_list">
                                    <ul>
 
                                    </ul>
                                </div>
                            </li>
                                       <li class="last"><a href="javascript:loadPage('通话流水','index.php?m=cdr&a=index','0')" target="_blank">查看全部</a></li>

                        </ul>
                    </li>

                    <li id="btn-user-status-pause" class=" dropdown" style="cursor:pointer;"><a data-hover="dropdown" data-position="left"><i class="fa fa-pause text-primary"></i></a>
                    </li>

                    <li id="btn-user-status-unpause" class=" dropdown" style="cursor:pointer;"><a data-hover="dropdown" data-position="left"><i class="fa fa-play text-primary"></i></a>
                    </li>

                    </if>


                    <li class=" dropdown openmessagebox" style="cursor:pointer;"><a data-hover="dropdown"  class="dropdown-toggle" data-step="4" data-intro="这里可以收发消息、查看历史消息。还有好多信息都是通过这里推送的。" data-position="left"><i class="fa fa-comment text-primary"></i><span id="message_count" class="badge badge-info"></span></a>
                    </li>


                    <li class="dropdown topbar-user" data-step="5" data-intro="查看、修改个人资料请点这里。" data-position="left"><a data-hover="dropdown"  href="javascript:void(0);"  class="dropdown-toggle"><img src="{:U('User/getImg')}" alt="" class="img-responsive img-circle"/>&nbsp;<span class="hidden-xs" style="color: #777777">{$Think.session.name}</span>&nbsp; <if condition="$Think.session.exten gt 0">( {$Think.session.exten} 分机 )</if><span class="caret"></span></a>
                        <ul class="dropdown-menu dropdown-user pull-right">
                            <li><a href="javascript:edit_myself()"><i class="fa fa-user"></i>&nbsp;个人资料</a></li>
                            <li><a href="__APP__?m=user&a=logout"><i class="fa fa-key"></i>&nbsp;退出</a></li>
                        </ul>
                    </li>

                    <li class="dropdown hidden-xs" ><!--BEGIN THEME SETTING-->
                         <a id="theme-setting" style="background: #FFF" href="javascript:;"
                            data-hover="dropdown" data-step="6" data-intro="这里可以修改边框样式，还有20款皮肤任你选。" data-position="left" class="dropdown-toggle"><i class="fa fa-cogs text-primary"></i></a>
                        <ul class="dropdown-menu dropdown-theme-setting pull-right">
                            <li><h4 class="mtn">皮肤样式</h4><select id="list-style" class="form-control">
                                <option value="style1">平面化方脚</option>
                                <option value="style2">平面化圆脚</option>
                            </select></li>
                            <li><h4 class="mtn">皮肤选择</h4>
                                <ul id="list-color" class="list-unstyled list-inline">
                                    <li data-color="green-dark" data-hover="tooltip" title="Green - Dark"
                                        class="green-dark"></li>
                                    <li data-color="red-dark" data-hover="tooltip" title="Red - Dark"
                                        class="red-dark"></li>
                                    <li data-color="pink-dark" data-hover="tooltip" title="Pink - Dark"
                                        class="pink-dark"></li>
                                    <li data-color="blue-dark" data-hover="tooltip" title="Blue - Dark"
                                        class="blue-dark"></li>
                                    <li data-color="yellow-dark" data-hover="tooltip" title="Yellow - Dark"
                                        class="yellow-dark"></li>
                                    <li data-color="green-grey" data-hover="tooltip" title="Green - Grey"
                                        class="green-grey"></li>
                                    <li data-color="red-grey" data-hover="tooltip" title="Red - Grey"
                                        class="red-grey"></li>
                                    <li data-color="pink-grey" data-hover="tooltip" title="Pink - Grey"
                                        class="pink-grey"></li>
                                    <li data-color="blue-grey" data-hover="tooltip" title="Blue - Grey"
                                        class="blue-grey"></li>
                                    <li data-color="yellow-grey" data-hover="tooltip" title="Yellow - Grey"
                                        class="yellow-grey"></li>
                                    <li data-color="yellow-green" data-hover="tooltip" title="Yellow - Green"
                                        class="yellow-green"></li>
                                    <li data-color="orange-grey" data-hover="tooltip" title="Orange - Grey"
                                        class="orange-grey"></li>
                                    <li data-color="pink-blue" data-hover="tooltip" title="Pink - Blue"
                                        class="pink-blue"></li>
                                    <li data-color="pink-violet" data-hover="tooltip" title="Pink - Violet"
                                        class="pink-violet active"></li>
                                    <li data-color="orange-violet" data-hover="tooltip" title="Orange - Violet"
                                        class="orange-violet"></li>
                                    <li data-color="pink-green" data-hover="tooltip" title="Pink - Green"
                                        class="pink-green"></li>
                                    <li data-color="pink-brown" data-hover="tooltip" title="Pink - Brown"
                                        class="pink-brown"></li>
                                    <li data-color="orange-blue" data-hover="tooltip" title="Orange - Blue"
                                        class="orange-blue"></li>
                                    <li data-color="yellow-blue" data-hover="tooltip" title="Yellow - Blue"
                                        class="yellow-blue"></li>
                                    <li data-color="green-blue" data-hover="tooltip" title="Green - Blue"
                                        class="green-blue"></li>
                                </ul>
                            </li>
                        </ul>
                        <!--END THEME SETTING--></li>
                </ul>
            </div>

        </nav>
</div>
    <!--END TOPBAR-->
    <div id="wrapper">
		 <!--BEGIN 右侧菜单-->
        {:W("Sidebar")}
         <!--END 右侧菜单-->
  
        <div id="info-panel" class="fixed">
            <div class="panel-inner">
            </div>
        </div>
        <!--pannel_1-->
       
        
 
         <!-- 消息弹出框 BEGIN-->
        <div id="new_noc_panel">
           <div id="new_noc_title">
                <span class="noc_iterm_num">共&nbsp;<span></span>&nbsp;条未读消息 &nbsp;&nbsp;&nbsp; <a href="javascript:;" onClick="noc_list();" hidefocus="hidefocus">历史消息</a>&nbsp;&nbsp;&nbsp; <a style="cursor:pointer;"  href="javascript:;" onClick="fasong();"> 发消息</a></span>
                <span class="noc_iterm_close"></span>
           </div> 
           <div id="nocbox_tips"></div>
           <div id="new_noc_list"></div>
           <div class="button">
                <a id="ViewAllNoc" class="btn-white-big" href="javascript:;" hidefocus="hidefocus">我都知道了</a>&nbsp;&nbsp;
           </div>              
        </div>
        <!--  弹出框 END -->
		<!--BEGIN PAGE WRAPPER-->
        <div id="page-wrapper">
		<!--BEGIN CONTENT-->
		<div class="page-content" id="nanyou-page-content">

</if>     